import java.util.ArrayList;

/**
 * Created by DelRosario on 12/30/13.
 */
public class Main {

    public static void main (String[] args){
        System.out.println(generate(1));
        System.out.println(generate(10));
    }

    static void easiestExerciseEver(){
        System.out.println("*");
    }

    static void drawHorizontalLine(int n){
        String value = "";
        for(int i = 0; i < n; i++){
            value = value + "*";
        }
        System.out.println(value);
    }

    static void drawVerticalLine(int n){
        for(int i=0; i < n; i++){
            System.out.println("*");
        }
    }

    static void drawRightTriangle(int n){
        String value = "";
        for(int i=0; i < n; i++){
            value = value + "*";
            System.out.println(value);
        }
    }

    static void drawIsocelesTriangle(int n){
        int linelength = n * 2 - 1;
        for(int i = 1; i <= n; i++){
            String value = "";
            for(int a = 0; a < (linelength - (i * 2 - 1))/2; a++ )
                value = value + " ";
            for(int b = 0; b < i * 2 - 1; b++)
                value = value + "*";
            System.out.println(value);
        }
    }

    static void drawDiamond(int n){
        drawIsocelesTriangle(n);
        int linelength = n * 2 - 1;
        for(int i = n-1; i > 0; i--){
            String value = "";
            for(int a = 0; a < (linelength - (i * 2 - 1))/2; a++ )
                value = value + " ";
            for(int b = 0; b < i * 2 - 1; b++)
                value = value + "*";
            System.out.println(value);
        }
    }

    static void drawDiamondWithName(int n){
        int linelength = n * 2 - 1;
        for(int i = 1; i < n; i++){
            String value = "";
            for(int a = 0; a < (linelength - (i * 2 - 1))/2; a++ )
                value = value + " ";
            for(int b = 0; b < i * 2 - 1; b++)
                value = value + "*";
            System.out.println(value);
        }

        System.out.println("Dannielle");

        for(int i = n-1; i > 0; i--){
            String value = "";
            for(int a = 0; a < (linelength - (i * 2 - 1))/2; a++ )
                value = value + " ";
            for(int b = 0; b < i * 2 - 1; b++)
                value = value + "*";
            System.out.println(value);
        }
    }

    static void FizzBuzz(){
        for(int i = 1; i <= 100; i++){
            if ( ((i % 3) == 0) && ((i % 5) == 0))
                System.out.println("FizzBuzz");
            else if ( (i % 3) == 0)
                System.out.println("Fizz");
            else if ( (i % 5) == 0)
                System.out.println("Buzz");
            else
                System.out.println(i);
        }
    }

    static ArrayList generate(int n){
        ArrayList list = new ArrayList();
        for(int i = 2; i <= n; i++)
            if ( n % i == 0){
                list.add(i);
                n /= i;
            }
        return list;
    }
}
